#include <xp/bas/stdio.c>

int xp_main ()
{
	xp_char_t buf[10];
	int n;

	n = xp_sprintf (buf, xp_countof(buf), XP_T("0123456789"));
	xp_printf (XP_T("%d [%s]\n"), n, buf);

	n = xp_sprintf (buf, xp_countof(buf), XP_T("012345678"));
	xp_printf (XP_T("%d [%s]\n"), n, buf);

	n = xp_sprintf (buf, xp_countof(buf), XP_T("01234"));
	xp_printf (XP_T("%d [%s]\n"), n, buf);

	return 0;
}
